﻿// DigitalDesign
// Project: InformationBoard
// Developer: Montak Oleg
// Created: 15.11.2011
// Last change: 16.11.2011
// Description: extension methods for EF-entities

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Server
{
    public partial class ScheduleChanx
    {
        public void Update(wScheduleChanxNode wChangeNode)
        {
            DateOfChange = wChangeNode.DateOfChange;
            TimeOfLanding = wChangeNode.TimeOfLanding;
            TimeOfDeparture = wChangeNode.TimeOfDeparture;
            StationOfDestination = wChangeNode.StationOfDestination;
            NumberOfTransport = wChangeNode.NumberOfTransport;
            ScheduleId = wChangeNode.ScheduleId;
            Canceled = wChangeNode.Canceled;
            LocationId = wChangeNode.LocationId;
        }

        public void Update(Schedule scheduleNode)
        {
            Location = scheduleNode.Location;
            LocationId = scheduleNode.LocationId;
            NumberOfTransport = scheduleNode.NumberOfTransport;
            Schedule = scheduleNode;
            ScheduleId = scheduleNode.Id;
            StationOfDestination = scheduleNode.StationOfDestination;
            TimeOfDeparture = scheduleNode.TimeOfDeparture;
            TimeOfLanding = scheduleNode.TimeOfLanding;
        }
    }
}
